package cn.qiao.demo.abstractFactory.factory;

import cn.qiao.demo.abstractFactory.factory.AbstractFactory;
import cn.qiao.demo.abstractFactory.service.Color;
import cn.qiao.demo.abstractFactory.service.Shape;
import cn.qiao.demo.abstractFactory.service.impl.Round;
import cn.qiao.demo.abstractFactory.service.impl.Square;

/**
 * desc:
 *
 * @author qiao
 * @date 2022年04月20日 15:44
 */
public class ShapeFactory implements AbstractFactory {
    public Color getColor(String type) {
        return null;
    }

    public Shape getShape(String type) {
        if ("Round".equals(type)) {
            return new Round();
        }
        if ("Square".equals(type)) {
            return new Square();
        }
        return null;

    }
}
